import 'package:flutter/material.dart';
import 'package:rss_readneed/public.dart';
import 'package:rss_readneed/main_tabBar.dart';

//import 'package:flutter_boost/flutter_boost.dart';

import 'package:rss_readneed/punch_card/punchCardModel.dart';//打卡的月度信息需要随app初始化
import 'package:rss_readneed/sn_support/SNAccount.dart';//打卡数据初始捞取 - 验证登录，获取数据

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  MyAppState createState() => new MyAppState();
}

class MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'ReadNeed',
      theme: ThemeData(

        scaffoldBackgroundColor: Colors.grey[100],//背景色

//        primarySwatch: mainColor,
        primaryColor: mainColor,
        primaryColorLight: mainColor[50],
        primaryColorDark:mainColor[900],

      ),
      home:MainTabBar(),
      navigatorObservers:[
        NaviManagerObserver(),//添加路由监听
      ],
//      builder: FlutterBoost.init(),//FlutterBoost初始支持
    );
  }
  @override
  void initState() {
    super.initState();

//    //FlutterBoost routers 统一至router
//    AppNavigator.flutterMixRouterConfig();

    PunchCardSettingModel.instance;////打卡的月度信息需要随app初始化
    PunchCardSettingModel.settings;
    SNAccount.instance;
//    UnityAds.instance;//初始化unity广告
//    VungleAds.instance;//初始化vungle广告
  }

  @override
  void dispose() {
    // TODO: implement dispose
    super.dispose();
  }

  @override
  void didUpdateWidget(MyApp oldWidget) {
    // TODO: implement didUpdateWidget
    super.didUpdateWidget(oldWidget);
  }

  @override
  void didChangeDependencies() {
    // TODO: implement didChangeDependencies
    super.didChangeDependencies();
  }
}
